﻿using System;
using System.Runtime.InteropServices;

namespace winapi
{
	/// <summary>
	/// Defines flags passed to <see cref="WlanGetAvailableNetworkList"/>.
	/// </summary>
	/// <see cref="http://msdn.microsoft.com/en-us/library/ms706749(VS.85).aspx"/>
	[Flags]
	public enum WlanGetAvailableNetworkListFlags
	{
		/// <summary>
		/// Include all ad-hoc network profiles in the available network list, including profiles that are not visible.
		/// </summary>
		WLAN_AVAILABLE_NETWORK_INCLUDE_ALL_ADHOC_PROFILES = 0x00000001,
		/// <summary>
		/// Include all hidden network profiles in the available network list, including profiles that are not visible.
		/// </summary>
		WLAN_AVAILABLE_NETWORK_INCLUDE_ALL_MANUAL_HIDDEN_PROFILES = 0x00000002
	}

	/// <summary>
	/// Defines the flags which specify characteristics of an available network.
	/// </summary>
	/// <see cref="http://msdn.microsoft.com/en-us/library/ms707403(VS.85).aspx"/>
	[Flags]
	public enum WlanAvailableNetworkFlags
	{
		/// <summary>
		/// This network is currently connected.
		/// </summary>
		WLAN_AVAILABLE_NETWORK_CONNECTED = 0x00000001,
		/// <summary>
		/// There is a profile for this network.
		/// </summary>
		WLAN_AVAILABLE_NETWORK_HAS_PROFILE = 0x00000002,
		/// <summary>
		/// The profile is the active console user's per user profile
		/// </summary>
		WLAN_AVAILABLE_NETWORK_CONSOLE_USER_PROFILE = 0x00000004
	}

	/// <summary>
	/// 
	/// </summary>
	/// <see cref="http://msdn.microsoft.com/en-us/library/ms706738(VS.85).aspx"/>
	[Flags]
	public enum WlanGetProfileFlags
	{
		/*/// <remarks>
		/// The only option available on Windows XP SP2.
		/// </remarks>
		AllUser = 0,*/
		WLAN_PROFILE_GET_PLAINTEXT_KEY = 0x00000004,
		WLAN_PROFILE_GROUP_POLICY = 0x00000001,
		WLAN_PROFILE_USER = 0x00000002
	}

	/// <summary>
	/// Defines the access mask of an all-user profile.
	/// </summary>
	/// <see cref="http://msdn.microsoft.com/en-us/library/ms706738(VS.85).aspx"/>
	[Flags]
	public enum WlanGetProfileAccessFlags
	{
		/// <summary>
		/// The user can view profile permissions.
		/// </summary>
		WLAN_READ_ACCESS = 0x00020000 | 0x0001,
		/// <summary>
		/// The user has read access, and the user can also connect to and disconnect from a network using the profile.
		/// </summary>
		WLAN_EXECUTE_ACCESS = WLAN_READ_ACCESS | 0x0020,
		/// <summary>
		/// The user has execute access and the user can also modify and delete permissions associated with a profile.
		/// </summary>
		WLAN_WRITE_ACCESS = WLAN_READ_ACCESS | WLAN_EXECUTE_ACCESS | 0x0002 | 0x00010000 | 0x00040000
	}

	/// <summary>
	/// Defines the mask which specifies where a notification comes from.
	/// </summary>
	/// <see cref="http://msdn.microsoft.com/en-us/library/ms706771(VS.85).aspx"/>
	[Flags]
	public enum WlanNotificationSource
	{
		/// <summary>
		/// No notifications
		/// </summary>
		WLAN_NOTIFICATION_SOURCE_NONE = 0,
		/// <summary>
		/// WLAN_NOTIFICATION_SOURCE_ALL notifications, including those generated by the 802.1X module.
		/// </summary>
		WLAN_NOTIFICATION_SOURCE_ALL = 0X0000FFFF,
		/// <summary>
		/// Notifications generated by the auto configuration module.
		/// </summary>
		WLAN_NOTIFICATION_SOURCE_ACM = 0X00000008,
		/// <summary>
		/// Notifications generated by WLAN_NOTIFICATION_SOURCE_MSM.
		/// </summary>
		WLAN_NOTIFICATION_SOURCE_MSM = 0X00000010,
		/// <summary>
		/// Notifications generated by the security module.
		/// </summary>
		WLAN_NOTIFICATION_SOURCE_SECURITY = 0X00000020,
		/// <summary>
		/// Notifications generated by independent hardware vendors (WLAN_NOTIFICATION_SOURCE_IHV).
		/// </summary>
		WLAN_NOTIFICATION_SOURCE_IHV = 0X00000040,
		/// <summary>
		/// Events sent from hosted network
		/// </summary>
		WLAN_NOTIFICATION_SOURCE_HNWK = 0X00000080,
		/// <summary>
		/// 
		/// </summary>
		WLAN_NOTIFICATION_SOURCE_ONEX = 0X00000004
	}

	/// <summary>
	/// Defines flags which affect connecting to a WLAN network.
	/// </summary>
	[Flags]
	public enum WlanConnectionParametersFlags
	{
		/// <summary>
		/// Connect to the destination network even if the destination is a hidden network. A hidden network does not broadcast its SSID. Do not use this flag if the destination network is an ad-hoc network.
		/// <para>If the profile specified by <see cref="WLAN_CONNECTION_PARAMETERS.profile"/> is not <c>null</c>, then this flag is ignored and the nonBroadcast profile element determines whether to connect to a hidden network.</para>
		/// </summary>
		WLAN_CONNECTION_HIDDEN_NETWORK = 0x00000001,
		/// <summary>
		/// Do not form an ad-hoc network. Only join an ad-hoc network if the network already exists. Do not use this flag if the destination network is an infrastructure network.
		/// </summary>
		WLAN_CONNECTION_ADHOC_JOIN_ONLY = 0x00000002,
		/// <summary>
		/// Ignore the privacy bit when connecting to the network. Ignoring the privacy bit has the effect of ignoring whether packets are encryption and ignoring the method of encryption used. Only use this flag when connecting to an infrastructure network using a temporary profile.
		/// </summary>
		WLAN_CONNECTION_IGNORE_PRIVACY_BIT = 0x00000004,
		/// <summary>
		/// Exempt EAPOL traffic from encryption and decryption. This flag is used when an application must send EAPOL traffic over an infrastructure network that uses Open authentication and WEP encryption. This flag must not be used to connect to networks that require 802.1X authentication. This flag is only valid when <see cref="WLAN_CONNECTION_PARAMETERS.wlanConnectionMode"/> is set to <see cref="WLAN_CONNECTION_MODE.TemporaryProfile"/>. Avoid using this flag whenever possible.
		/// </summary>
		WLAN_CONNECTION_EAPOL_PASSTHROUGH = 0x00000008
	}

	/*/// <summary>
	/// Flags that specifiy the miniport driver's current operation mode.
	/// </summary>
	[Flags]
	public enum Dot11OperationMode :uint
	{
		Unknown = 0x00000000,
		Station = 0x00000001,
		AP = 0x00000002,
		/// <summary>
		/// Specifies that the miniport driver supports the Extensible Station (ExtSTA) operation mode.
		/// </summary>
		ExtensibleStation = 0x00000004,
		/// <summary>
		/// Specifies that the miniport driver supports the Network Monitor (NetMon) operation mode.
		/// </summary>
		NetworkMonitor = 0x80000000
	}*/
}
